
package com.yjh.admin.server.sys.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.yjh.admin.entity.user.SysRole;
import com.yjh.admin.mapper.user.SysRoleMapper;
import com.yjh.admin.server.sys.SysRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统角色表
 *
 * @author GuoBin
 * @date 2020-07-10 11:03:04
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    /**
     * 通过用户ID，查询角色信息
     *
     * @param userId
     * @return
     */
    @Override
    public List findRolesByUserId(Integer userId) {
        return baseMapper.listRolesByUserId(userId);
    }
}
